#!/usr/bin/python
#coding:utf8
'''
Facade
'''
class AlarmSensor:
    def run(self):
        print("AlarmSensor run")
    def close(self):
        print("AlarmSensor close")

class FireSensor:
    def run(self):
        print("FireSensor run")
    def close(self):
        print("FireSensor close")

class Sprinker:
    def run(self):
        print("Sprinker run")
    def close(self):
        print("Sprinker close")

# Facade
class EmergencyFacade:
    def __init__(self):
        self.alarm_sensor = AlarmSensor()
        self.fire_sensor = FireSensor()
        self.sprinker = Sprinker()
        
    def runAll(self):
        self.fire_sensor.run()
        self.alarm_sensor.run()
        self.sprinker.run()

    def closeAll(self):
        self.sprinker.close()
        self.alarm_sensor.close()
        self.fire_sensor.close()


# Client
if __name__ == '__main__':
    fire_emergency = EmergencyFacade()
    fire_emergency.runAll()
    print("...."*10)
    fire_emergency.closeAll()
